package cn.minhx.lab.design_patterns.bridge.f2.pay.channel;

import cn.minhx.lab.design_patterns.bridge.f2.pay.mode.IPayMode;

import java.math.BigDecimal;

public class WxPay extends Pay {

    public WxPay(IPayMode payMode) {
        super(payMode);
    }

    public String doPay(String uId, String tradeId, BigDecimal amount) {
        System.out.println("微信支付");

        System.out.println("微信支付 -> 风控校验");
        boolean security = payMode.securityCheck(uId);
        if (!security) {
            System.out.println("微信支付 -> 风控校验失败！");
            return "0001";
        }
        System.out.println("微信支付 -> 风控校验成功！");
        return "0000";
    }

}